﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _003文字打怪游戏
{
    /// <summary>
    /// 怪物类
    /// </summary>
    class Monster:Character
    {
        //怪物类独有的字段
        public string SkillName { get; set; }//技能在
        public Monster(string name, int hp, float defense, float av,string sn) : base(name, hp, defense, av)
        {
            SkillName = sn;
        }

        /// <summary>
        /// 重写父类的输出属性方法
        /// </summary>
        public override void PrintCharacterAttr()
        {
            base.PrintCharacterAttr();//调用父类的方法
            Console.WriteLine("技能:{0}", SkillName);
            Console.WriteLine("------------------");
        }

    }
}
